package com.hysf.ioc.pro1.test;

import com.hysf.ioc.pro1.config.BankOracleDao;
import com.hysf.ioc.pro1.config.AppConfig;
import com.hysf.ioc.pro1.config.BankDao;
import com.hysf.ioc.pro1.config.BankMysqlDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App4 {
	public static void main(String[] args) {
		ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
		BankDao bankDao = context.getBean("bankMysqlDao", BankMysqlDao.class);
		bankDao.get();
		bankDao = context.getBean("bankOracleDao", BankOracleDao.class);
		bankDao.get();
	}
}
